package page.Beans;

import java.sql.SQLException;

import basicTypes.RAResource;

public class removeManut {
	private int idRec;

	public void setIdRec(int idRec) {
		this.idRec = idRec;
	}

	public int getIdRec() {
		return idRec;
	}
	
	public String remManut(loginBean x) throws SQLException{
			RAResource recurso;
		try{
			recurso = x.getBd().db_getResource(x.getUser(), idRec);
		}
		catch(SQLException e){
			return "fail";
		}
		
		x.getBd().db_removeFromMaintenance(x.getUser(), recurso);
		
		return "suc";
		
	}
}
